home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
misc
/
amag
/
sh9302a.lha
/
Tips+Tricks (S.36)
/
GetJoyData.c
next >
Wrap
C/C++ Source or Header
|
1993-11-10
|
548b
|
31 lines
/* Getjoydata.c
für Aztec-C 3.6
*/
#include <hardware/custom.h>
#include <hardware/cia.h>
void main()
{
puts("Joystick in Port 1!");
do
{
if( custom.joy1dat&2 )
puts("rechts");
if( custom.joy1dat&512 )
puts("links");
if( ((custom.joy1dat&1) == 1) ^
((custom.joy1dat&2) == 2) )
puts("unten");
if( ((custom.joy1dat&256) == 256) ^
((custom.joy1dat&512) == 512) )
puts("oben");
} while( ciaa.ciapra&CIAF_GAMEPORT1 );
/* solange Abfragen, bis der Knopf gedrückt wird */
}